<template>
    <div>
        <div v-for="(item, index) in memberList" :key="index" class="member-item">
            <div class="user-box" style="border-bottom: 1px solid #ebedf0">
                
                <div class="user-name">{{ item.truename}}（{{ item.username }}）</div>

                <div class="user-info">
                    <div class="user-info-item">
                        <span>成员职位</span>：<span>{{ item.positionName }}</span>
                    </div>
                    <div class="user-info-item">
                        <span>成员部门</span>：<span>{{ item.belongDepartmentName }}</span>
                    </div>
                    <div class="user-info-item">
                        <span>成员单位</span>：<span>{{ item.belongCompanyName }}</span>
                    </div>
                    <div class="user-info-item">
                        <span>联系方式</span>：<span>{{ item.preferredMobile }}</span>
                    </div>
                    <div class="user-info-item">
                        <span>成员排序</span>：<span>{{ item.memberSort }}</span>
                    </div>
                    <div class="user-info-item">
                        <span>加入日期</span>：<span>{{ item.joinDate }}</span>
                    </div>

                    <div class="user-info-item2" v-if="item.memberType">
                        成员类型：{{ item.memberType }}
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    props: {
        memberList: {
            type: Array,
            default: () => [],
        },
    },
};
</script>

<style lang="less" scoped>
.member-item {
    .title {
        height: 50px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        font-size: 18px;
        font-weight: 500;
        padding-left: 10px;
        border-bottom: 1px solid #ddd;
    }

    .user-box {
        padding: 10px;

        .user-name {
            font-size: 14px;
            font-weight: 500;
        }

        .user-info {
            display: flex;  /// 盒子横向布局  
            flex-wrap: wrap;    /// 会换行
            
            .user-info-item {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                width: 50%;
                height: 35px;
                color: #aab2cc;
                font-size: 12px;
            }

            .user-info-item2 {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                width: 100%;
                height: 35px;
                color: #aab2cc;
                font-size: 14px;
            }
        }
    }
}
</style>
